<?php

if (! defined ( 'IN_DISCUZ' )) {
	exit ( 'Access Denied' );
}

require_once 'com_fun.php';

$query=$_G['gp_query'];

if($query=='query')
{
	$date=$_G['gp_date'];
	
	if(!$date)
	{
		echo 'date error';
		return;
	}
	
	$key='eeb775159150f77a3f6a85586addc485';
	$keyword=urlencode($keyword);
	
	$url="http://v.juhe.cn/laohuangli/d?date=$date&key=$key";	
//	$url="http://127.0.0.1/fytools/source/plugin/fytools/interface/dream_list.txt";
	
	$result=ComFun::get_result_from_url2($url);
	if($result)
	{
		$rili=$result->result;		
	}
	
	$url="http://v.juhe.cn/laohuangli/h?date=$date&key=$key";
	$result=ComFun::get_result_from_url2($url);
	
	if($result)
	{		
		$hourArray=$result->result;
		
		echo count($hourArray);
		
	}
	
	
	include template('fytools:lunar-detail');
}
else
{

	include template('fytools:lunar');
}
	

